<?php
/**
 * @version		$Id: default.php 17109 2010-05-16 21:03:55Z severdia $
 * @package		Joomla.Administrator
 * @subpackage	com_content
 * @copyright	Copyright (C) 2005 - 2010 Open Source Matters, Inc. All rights reserved.
 * @license		GNU General Public License version 2 or later; see LICENSE.txt
 */

// no direct access
defined('_JEXEC') or die;

require_once JPATH_COMPONENT.'/helpers/ajaxwhois.php';
require_once JPATH_COMPONENT.'/helpers/html/ajaxwhois.php';

JHtml::_('behavior.tooltip');
JHtmlAjaxWhois::tipStyle();

$listOrder	= $this->state->get('list.ordering');
$listDirn	= $this->state->get('list.direction');
?>
<style type="text/css">
fieldset#filter-bar {
	height:30px !important;
}
</style>
<form action="<?php echo JRoute::_('index.php?option=com_ajaxwhois&amp;view=configs'); ?>" method="post" name="adminForm">
	<fieldset id="filter-bar">
      <table cellpadding="1" class="adminheading">
        <tr>
            <td class="right">
                <label class="filter-search-lbl" for="filter_title"><?php echo JText::_('COM_AJAXWHOIS_CONFIG_FILTER_LABEL'); ?>:</label>
            </td>
            <td>
                <input class="short" type="text" name="filter_title" id="filter_title" value="<?php echo $this->state->get('filter.title'); ?>" title="<?php echo JText::_('COM_AJAXWHOIS_CONFIG_SEARCH'); ?>" onchange="this.form.submit()" />
            </td>
        </tr>
      </table>
    </fieldset>
    <table class="adminlist">
        <thead>
            <tr>
                <th width="1%">
                    <input type="checkbox" name="toggle" value="" onclick="checkAll(this)" />
                </th>
                <th class="left">
                    <?php echo JHTML::_('grid.sort',   'Config', 'a.title', $listDirn, $listOrder ); ?>
                </th>
                <th width="8%">
					<?php echo JHtml::_('grid.sort', 'COM_AJAXWHOIS_CONFIG_DEFAULT', 'a.home', $listDirn, $listOrder); ?>
                </th>
                <th width="6%">
                    <?php echo JText::_( 'Published' ); ?>
                </th>
                <th width="5%">
                    <?php echo JHTML::_('grid.sort',   'ID', 'a.id', $listDirn, $listOrder ); ?>
                </th>
            </tr>
        </thead>
        <tfoot>
            <tr>
                <td colspan="23"><?php echo $this->pagination->getListFooter(); ?></td>
            </tr>
        </tfoot>
        <tbody>
		<?php foreach ($this->items as $i => $item) : ?>
            <tr class="row<?php echo $i % 2; ?>">
                <td class="center">
                    <?php echo JHtml::_('grid.id', $i, $item->id); ?>
                </td>
                <td>
                    <a href="<?php echo JRoute::_('index.php?option=com_ajaxwhois&task=config.edit&id='.$item->id);?>">
                        <?php echo $this->escape($item->title); ?>
                    </a>
                </td>
                <td class="center">
					<?php echo JHtml::_('jgrid.isdefault', $item->home, $i, 'configs.', !$item->home);?>
                </td>
                <td class="center">
                    <?php echo JHtml::_('jgrid.published', $item->published, $i, 'configs.', true); ?>
                </td>
                <td class="center">
                    <?php echo (int) $item->id; ?>
                </td>
            </tr>
        <?php endforeach; ?>
        </tbody>
    </table>

	<input type="hidden" name="task" value="" />
	<input type="hidden" name="boxchecked" value="0" />
	<input type="hidden" name="filter_order" value="<?php echo $listOrder; ?>" />
	<input type="hidden" name="filter_order_Dir" value="<?php echo $listDirn; ?>" />
	<?php echo JHtml::_('form.token'); ?>
</form>
